<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>注册页面</title>
</head>
<script language="javascript">  
function isValid(form)  
{  
if (form.username.value=="")  
 {  
 alert("用户名不能为空");  
 return false;  
 }  
if (form.pwd.value!=form.pwd2.value)  
{  
alert("两次输入的密码不同！");  
return false;  
}  
else  if (form.pwd.value=="")  
{  
alert("用户密码不能为空！");  
return false;  
}  
else return true;  
}  
</script>  
  <body>
    <center>
	<font face="楷体" size="6" color="#000">注册界面</font>
	<form action = "checkRegister.jsp" method = "post" onSubmit="return isValid(this);">
  	<table width="300" height = "180" border="5" bordercolor="#A0A0A0">
  	  <tr>
		<th>用户名：</th>
		<td><input type="text" name="username"></td>
 	  </tr>
 	  <tr>
 		<th>输入密码：</th>
 		<td><input type="text" name="pwd" ></td>
 	  </tr>
 	  <tr>
 		<th>再次输入密码：</th>
 		<td><input type="text" name="pwd2" ></td>
 	  </tr>
 	  <tr><th>姓名：</th><td><input type="text" name="name"></td></tr>
 	  <tr><th>性别：</th><td><input type="text" name="sex"></td></tr>
 	  <tr><th>年龄：</th><td><input type="text" name="age"></td></tr>
 	  <tr><th>学号：</th><td><input type="text" name="number"></td></tr>
	  <tr>
 		<td colspan = "2" align = "center">
 		  <input type="submit" value="注  册">    
 		  <input type="reset" value="重  置">
 		</td>
	  </tr>
	</table>
    </form>
    </center>
  </body>
</html>